package br.com.news.web.service;

import javax.ws.rs.core.MediaType;

import br.com.news.utils.database.beans.ContatoBean;

import com.google.gson.Gson;
import com.sun.jersey.api.client.Client;

public class ContatoService {

	public void save(ContatoBean contatoBean) {

		Gson g = new Gson();
		String json = g.toJson(contatoBean);

		Client c = Client.create();
		c.resource("http://localhost:8080/news-web-service-rest/contato/insert")
				.type(MediaType.APPLICATION_JSON).post(json);

	}

}
